package com.Ajava1704.for线程池2;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @类名: com.Ajava1704.for线程池2
 * @作者: lgt
 * @创建时间: 2020-02-11 20:08
 * @描述:创建一个定长的线程池  创建一个带缓冲的线程池
 **/
public class ForPoolTest3 {

    public static void main(String[] args) {
        //创建一个定长的线程池
        ExecutorService executorService = Executors.newFixedThreadPool(2);
        //创建一个带缓冲的线程池
        ExecutorService executorService1 = Executors.newCachedThreadPool();
    }

}
